//
//  ClubTableViewCell.swift
//  YueJian
//
//  Created by mac on 2017/10/20.
//  Copyright © 2017年 MapleStory. All rights reserved.
//

import UIKit

class ClubTableViewCell: UITableViewCell {

    var segment: UISegmentedControl?
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)

        segment = UISegmentedControl(frame: CGRect(x: 60, y: 10, width: UIScreen.main.bounds.width-120, height: 30))
        segment?.insertSegment(withTitle: "最具人气", at: 0, animated: true)
        segment?.insertSegment(withTitle: "离我最近", at: 1, animated: true)
        segment?.selectedSegmentIndex = 0
        self.addSubview(segment!)
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

//    override func awakeFromNib() {
//        super.awakeFromNib()
//
//        let segment = UISegmentedControl(frame: CGRect(x: 60, y: 10, width: UIScreen.main.bounds.width-120, height: 30))
////        segment.numberOfSegments
//        segment.insertSegment(withTitle: "最具人气", at: 0, animated: true)
//        segment.insertSegment(withTitle: "离我最近", at: 1, animated: true)
//        self.addSubview(segment)
//    }
//
//    override func setSelected(_ selected: Bool, animated: Bool) {
//        super.setSelected(selected, animated: animated)
//
//        // Configure the view for the selected state
//    }
//
}
